require(["config"],function(){
	require(["jquery","template","load"],function($, template){
		function Index(){
			this.loadHotproducts();
		}
		$.extend(Index.prototype,{
			loadHotproducts(){
				//新品推荐
				$.getJSON("http://rap2api.taobao.org/app/mock/120051/api/lub",(data)=>{
					const html = template("prod-template",{products:data.res_body.list});
					$(".spl").html(html);
				});
				//主推品牌&品牌潮流
				$.getJSON("http://rap2api.taobao.org/app/mock/120051/api/zt",(data)=>{
					const html = template("zt",{prod:data.res_body.list});
					$(".sp").html(html);
				});
			}
		});
		new Index();
	});
});

